/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponseString } from "../models/BaseResponseString";

import type { CancelablePromise } from "../core/CancelablePromise";
import { OpenAPI } from "../core/OpenAPI";
import { request as __request } from "../core/request";
import { ApiRequestOptions } from "../core/ApiRequestOptions";

export class FileControllerService {
  /**
   * @param requestBody
   * @returns BaseResponseString OK
   * @throws ApiError
   */
  public static upload(requestBody?: {
    file: Blob;
  }): CancelablePromise<BaseResponseString> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/file/upload",
      body: requestBody,
      mediaType: "multipart/form-data",
    });
  }

  public static download(): CancelablePromise<BaseResponseString> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/file/download",
      responseType: "blob",
    } as ApiRequestOptions & { responseType: "blob" });
  }
}
